package bishi.zijie;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/09/05 20:12
 */
public class four {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double[][] nums = new double[n][2];
        int index=0;
        while(n>index){
            Arrays.fill(nums[index++],1.0 - sc.nextDouble());
        }
        int M = sc.nextInt();
        Arrays.sort(nums, (o1, o2) -> o1[1]>o2[1]?1:-1);
        while(M>0){
            M-=n;
            int m = M>=0?n:(n+M);
            for(int i=n-1;i>=n-m;i--){
                nums[i][1]*=nums[i][0];
            }
            if(M>0){
                Arrays.sort(nums, (o1, o2) -> o1[1]>o2[1]?1:-1);
            }
        }
        double res = 1.0;
        for(double[] ds:nums){
            res*=(1-ds[1]);
        }
        System.out.println(res);
    }
}
